//
// Created by 21577 on 2025/3/4.
//
#include<stdio.h>

int main() {
    int i, j;
    int count, add;
    int factors[1001];
    for (i = 1; i <= 1000; i++) {
        count=0,add=0;
        for (j = 1; j < i; j++) {
            if (i % j == 0) {
                factors[count] = j;
                add += j;
                count++;
            }
        }
        if (i == add) {
            printf("%d ", i);
            printf("its factors are ");
            for (int k = 0; k < count; k++) {
                printf("%d ", factors[k]);
            }
            printf("\n");
        }
    }
    return 0;
}